package cn.lsnu.common.interfacetools.interfaceservice;

import cn.lsnu.common.interfacetools.interfaceentity.Page;

import java.util.List;

/**
 * @Description service层的顶级类
 * @author  lin
 * @Datetime  2020/2/1 16:54
 */
public interface  TopService<T> {

    //保存数据
    public void save(T entity) throws  Exception;

    //通过id获取一条数据
    public T get(String key) throws  Exception;

    //通过entity获取一条数据
    public T getEntity(T entity) throws  Exception;

    //返回list数组
    public List<T>  findList(T entity) throws Exception;

    //返回分页数据
//    public Page<T> findPage(T entity) throws  Exception;

    //删除数据
    public void delete(T entity) throws  Exception;

    //修改数据
    public void update(T entity)throws  Exception;




}
